package com.zmovie.framework.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zmovie.framework.domain.CinemaBrand;
import com.zmovie.framework.service.CinemaBrandService;
import com.zmovie.framework.mapper.CinemaBrandMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author lenovo
* @description 针对表【cinema_brand】的数据库操作Service实现
* @createDate 2023-11-27 20:38:22
*/
@Service
public class CinemaBrandServiceImpl extends ServiceImpl<CinemaBrandMapper, CinemaBrand>
    implements CinemaBrandService{

    @Override
    public List<CinemaBrand> listCinemaBrands(CinemaBrand cinemaBrand) {
        LambdaQueryWrapper<CinemaBrand> wrapper = new LambdaQueryWrapper<>();
        wrapper.like(cinemaBrand.getName() != null, CinemaBrand::getName, cinemaBrand.getName());
        wrapper.orderByAsc(CinemaBrand::getName);
        return list(wrapper);
    }
}




